<?php
namespace app\home\controller;


use app\home\model\EngineeringModel;
use app\home\model\PicModel;
use app\home\model\ProgramModel;
use app\home\model\VideoModel;
use think\Session;

class User extends Base
{
    protected $_check_login = [
        'index','my_list'
    ];
    public function index()
    {
        $this->assign('user_name',Session::get('user.mobile'));
        $type = input('type',1,'intval');
        if($type == '1'){
            $model = new EngineeringModel();
        }elseif($type == '2'){
            $model = new PicModel();
        }elseif($type == '3'){
            $model = new VideoModel();
        }elseif($type == '4'){
            $model = new ProgramModel();
        }
        $list = $model->get_my_list($this->_user_id);
        $this->assign('list',$list);
        $this->assign('type',$type);
        return view();

    }
}
